package com.bauer.module.common.utils;

import java.util.Random;

/**
 * @program: clock
 * @description:
 * @author: bauer weo
 * @create: 2019-10-13 19:30
 */
public class RandomUtils {
    private static final String CHARACTER = "abcdefghijklmnopqrstuvwxyz0123456789";

    public static String genRandomString(int length) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < length; i++) {
            sb.append(CHARACTER.charAt(new Random().nextInt(CHARACTER.length())));
        }
        return sb.toString();
    }
}
